The ViewMode enumeration defines view modes known by PCCViewer.ViewerControl. The ViewerControl uses a specified view mode to set or update how documents that contain different sized pages are displayed in the viewer. This enumeration is a convenience for API developers. Instead of using it, you can pass in the string values of the view mode (enumeration values) directly to the API.
There are three view modes available:
- Document - The viewer maintains the relative size of each page when displaying a document. For example, if page 2 is smaller than page 1, it will appear smaller. In this view mode, the user can choose to scroll through the document or select one of the View icons to go from the First page to the Last page of the document.
- EqualWidthPages - The viewer scales each page so that their width is the same. For example, if page 2 is smaller than page 1, it will be scaled larger so that its width is equal to the width of page 1. In this view mode, the user can choose to scroll through the document or select one of the View icons to go from the First page to the Last page of the document.
- SinglePage - The viewer displays a single page at a time. Each page is scaled to fit within a view box, which is the initial size of the viewer and increases in size when zooming in (and decreases in size when zooming out). After the viewer initializes, the view mode may not be changed to or from SinglePage view mode (or an exception will occur). In this view mode, the user selects one of the View icons to go from the First page to the Last page of the document which simulates a smooth transition from page to page. This view mode is non-scrolling.
To set the ViewMode:
Example |
Copy Code
|
// use the enumeration
myViewerControl.setViewMode(PCCViewer.ViewMode.SinglePage);
// or just use the string value
myViewerControl.setViewMode("SinglePage");
|